﻿@using Abp.Authorization.Users
@using LyyCMS.Web.Models.Common.Modals
@using LyyCMS.Web.Models.Articles
@model ArticleCategoryListViewModel
@{
    Layout = null;
}
<div class="modal fade" id="ArticleCategoryModal" tabindex="-1" role="dialog" aria-labelledby="ArticleCategoryModalLabel" data-backdrop="static">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            @await Html.PartialAsync("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(L("CreateNewArticleCategory")))
            <form name="userCreateForm" role="form" class="form-horizontal" enctype="multipart/form-data">
                <div class="modal-body">
                    <ul class="nav nav-tabs" role="tablist">
                        <li class="nav-item">
                            <a class="nav-link active" data-toggle="tab" role="tab" href="#create-user-details">@L("ArticleCategoryDetails")</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" data-toggle="tab" role="tab" href="#create-user-roles">@L("Parent")</a>
                        </li>
                    </ul>
                    <div class="tab-content mt-4">
                        <div role="tabpanel" class="tab-pane container active" id="create-user-details">

                            <div class="form-group row required">
                                <label class="col-md-3 col-form-label">@L("Name")</label>
                                <div class="col-md-9">
                                    <input type="text" class="form-control" name="Name" required>
                                </div>
                            </div>
                            <div class="form-group row required">
                                <label class="col-md-3 col-form-label">@L("Description")</label>
                                <div class="col-md-9">
                                    <input type="text" class="form-control" name="Description" required>
                                </div>
                            </div>
                            <div class="form-group row required">
                                <label class="col-md-3 col-form-label">@L("OrderNum")</label>
                                <div class="col-md-9">
                                    <input type="number" class="form-control" name="OrderNum" required value="99">
                                </div>
                            </div>

                        </div>
                        <div role="tabpanel" class="tab-pane container" id="create-user-roles">
                            <div class="form-group row required">
                                <label class="col-md-3 col-form-label">@L("Parent")</label>
                                <div class="col-md-9">
                                    <select id="ParentId" name="ParentId" class="form-control">
                                        <option value="0">无</option>
                                        @if (null != Model.ParentCategoryList)
                                        {
                                            foreach (var parent in Model.ParentCategoryList)
                                            {
                                                <option value="@parent.Id">@parent.Name </option>
                                            }
                                        }

                                    </select>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
                @await Html.PartialAsync("~/Views/Shared/Modals/_ModalFooterWithSaveAndCancel.cshtml")
            </form>
        </div>
    </div>
</div>
